import { ArticleDetail } from '@/types/data'
import { ArticleDetailAction } from '@/types/store'

/* eslint-disable camelcase */
type State = {
  info: ArticleDetail
//   comment: {}
}
const initialState = {
  info: {}
//   comments: {}
} as State

const article = (state = initialState, action: ArticleDetailAction) => {
  if (action.type === 'articleDetail/setArticleInfo') {
    return { ...state, info: action.payload }
  }
  return state
}

export default article
